Lesson 10 - tuples

Tuples syntax follows most of the same rules of a list apart from -


def displayTuple(tuple):
	for i in tuple:
		print i
		
z = ("a", "b", "c")
displayTuple(z)
displayTuple( ( 21, 6, 43, 21, 53) ) # they can be created as a parameter!

Tuples can be created as a parameter as shown in the code example above.